<!DOCTYPE html>
<html>

<head>
    <meta name="layout" content="main2"/>
    <g:set var="entityName" value="${message(code: 'productLine.label', default: 'productLine')}"/>
    <title>角色：${this.role?.authority}</title>
</head>

<body>

<div class="main-body">
    <div class="page-wrapper">
        <!-- Page-header start -->
        <div class="page-header">
            <div class="page-header-title">
                <h4>角色：${this.role?.authority}</h4>
            </div>

            <div class="page-header-breadcrumb">
                <ul class="breadcrumb-title">
                    <li class="breadcrumb-item">
                        <a href="/salesDashboard/index">
                            <i class="icofont icofont-home"></i>
                        </a>
                    </li>
                    <li class="breadcrumb-item">
                        <g:link action="index" controller="role">角色列表</g:link>
                    </li>
                    <li class="breadcrumb-item"><a href="#!">角色：${this.role?.authority}</a>
                    </li>
                </ul>
            </div>
        </div>
        <!-- Page-header end -->
        <!-- Page-body start -->
        <div class="page-body">

            <!-- Hover table card start -->
            <div class="card">
                <div class="card-header">
                    <h5>角色：${this.role?.authority}</h5>

                    <div class="card-header-right">
                        <g:link action="edit" resource="${this.role}" data-toggle="tooltip" data-placement="top"
                                title="" data-original-title="编辑">
                            <i class="icofont icofont-edit"></i>
                        </g:link>

                        <i class="icofont icofont-rounded-down"></i>
                    </div>
                </div>

                <div class="card-block">
                    <div class="form-group row">
                        <label class="col-md-2 col-form-label">角色名称</label>

                        <div class="col-md-3">
                            <span class="cont">${this.role?.authority}</span>
                        </div>
                        <label class="col-md-2 col-form-label">角色描述</label>

                        <div class="col-md-5">
                            <span class="cont">${this.role?.description}</span>
                        </div>
                    </div>

                    <div class="form-group row">
                        <label class="col-md-2 col-form-label">用户量</label>

                        <div class="col-md-3">
                            <span class="cont">${this.userList?.size()}</span>
                        </div>
                        <label class="col-md-2 col-form-label">菜单</label>

                        <div class="col-md-3">
                            <span class="cont">${this.role?.menu?.name}</span>
                        </div>
                    </div>

                </div>

            </div>

            <div class="card">
                <div class="card-header">
                    <h5>用户</h5>

                    <div class="card-header-right">

                        <i class="icofont icofont-rounded-down"></i>
                    </div>
                </div>

                <div class="card-block dt-responsive">

                    <div class="table-responsive">
                        <div id="dom-jqry_wrapper" class="dataTables_wrapper dt-bootstrap4">
                            <div class="table-responsive">
                                <table class="table table-striped table-bordered table-hover">
                                    <thead>
                                    <tr>
                                        <g:sortableColumn property="fullName"
                                                          title="${message(code: 'user.fullName.label', default: '姓名')}"/>
                                        <g:sortableColumn property="cellphone"
                                                          title="${message(code: 'user.cellphone.label', default: '手机号')}"/>
                                        <g:sortableColumn property="city"
                                                          title="${message(code: 'user.city.label', default: '所在城市')}"/>
                                        <g:sortableColumn property="department"
                                                          title="${message(code: 'user.department.label', default: '部门')}"/>

                                       %{-- <g:sortableColumn property="account"
                                                          title="${message(code: 'user.account.label', default: '所属公司')}"/>
--}%
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <g:each in="${userList}">
                                        <tr>
                                            <td>
                                                <g:link action="show" resource="${it}"
                                                        class="firstTd">${it?.fullName}</g:link>
                                            </td>
                                            <td class="cellphoneFormat">${it?.cellphone}</td>
                                            <td>${it?.city?.name}</td>
                                            <td>
                                                ${it?.department?.name}
                                            </td>
                                            
                                           %{-- <td>--}%%{--${it?.account?.name}--}%%{--</td>--}%

                                        </tr>
                                    </g:each>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
            <!-- Hover table card end -->
        </div>

        <!-- Page-body end -->

    </div>
</div>

</body>

</html>
